package com.xing.commonsswagger;

import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @version 1.0
 * @Author Xing
 * @Date 2023/11/15 9:00
 */
@Configuration
@EnableKnife4j
public class SwaggerConfig {

    @Bean
    public OpenAPI customOpenAPI() {
        Contact contact = new Contact();
        contact.setName("星火线上会议平台");

        return new OpenAPI().info(new Info()
                .title("星火会议平台")
                .description("接口文档")
                .contact(contact)
                .version("1.0")
                .termsOfService(""));
    }
}
